package com.linran.javaweb.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

/**
 * 使用例子
 * :T(com.karakal.saas.constant.LockConst).CONTRACT_UPDATE_KEY 获取常量
 * :#param.property 获取对象属性
 * :'Aa' 指定固定值
 *
 * @author tujiong
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface DistributedLock {

    String bizKey();

    String resourceKey();

    long expiredTime() default 5;

    TimeUnit timeUnit() default TimeUnit.MINUTES;

    String message() default "{lock.failed}";

}
